<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="/scripts/jquery.js" type="text/javascript"></script>
    <script src="/scripts/semantic.min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="${base}/themes/semantic.min.css">
    <title>主页</title>
    <style type="text/css">
        #main-content {
            min-height: 900px;
        }
    </style>

</head>
<body>
<div class="ui inverted attachted top stackable menu">
    <div href="" class="item" style="margin-left: 150px;">我的博客</div>
    <div class="header active item">
        <a href="/">首页</a>
    </div>
    <a href="/message/list" class="item">留言</a>
    <div class="item">
        <div class="ui icon mini input">
            <i class="search icon"></i>
            <input type="text" name="searchtext" placeholder="查找...">
        </div>
    </div>
    <div class="right menu">
    <#if (session.user)??>
        <a class="item"><i class="user icon"></i>${session.user!''}</a>
        <a href="/logout" class="item">登出</a>
    <#else>
        <a href="/login" class="item">登录</a>
        <a href="/register" class="item">注册</a>
    </#if>
    </div>
</div>
<div class="ui grid container">

    <div class="sixteen wide column" id="main-content">
        <table class="ui celled striped  table" id="message-tables">
            <thead>
            <tr>
                <th>编号</th>
                <th>用户</th>
                <th class="four wide">标题</th>
                <th class="four wide">内容</th>
                <th class="three wide">发表时间</th>
                <th class="two wide">操作</th>
            </tr>
            </thead>
        <#if messages??>
            <#list messages as message>
                <tr>
                    <td>${message.id}</td>
                    <td>${message.nickname}</td>
                    <td>${message.title}</td>
                    <td>${message.content?right_pad(20)?substring(0,20)!""}</td>
                    <td>${message.pubdate}</td>
                    <td></td>
                </tr>
            </#list>
        </#if>
            </tbody>
        </table>
    </div>

</div>
<div class="ui footer inverted vertical segment">
    <div class="ui container grid">
        <div class="three wide column">1</div>
        <div class="three wide column">1</div>
        <div class="seven wide column">1</div>
    </div>
</div>
</body>


</html>

